<div ng-controller="SubscribemessageCtrl" ng-init="listAction()">
    <ul class="sui-breadcrumb">
        <li>{{'订阅消息'| translate}}</li>
        <li class="active">
            {{"List"|translate}}
            <span>
                <wx-app-list ng-model="wxappid" dft="1" ary="storeary" storedata="1">
                </wx-app-list>
                <a class="sui-btn btn-primary" href="#/subscribemessage/mylist?app_id={{wxappid}}">{{'我的模板列表'| translate}}</a>
            </span>
        </li>
        <span class="sui-form sui-form pull-right">
            <template-library app-id="wxappid" title-check="titleCheck(title)"></template-library>
        </span>
    </ul>
    <table class="sui-table table-bordered">
        <thead>
            <tr>
                <!-- <th>{{'#'|translate}}</th> -->
                <th>{{'编号'|translate}}</th>
                <th>{{'title'|translate}}</th>
                <th>{{'关键词编号'|translate}}</th>
                <th>{{'内容'|translate}}</th>
                <th>{{'例子'|translate}}</th>
                <th>{{'模板分类'|translate}}</th>
                <th>{{'模板类型'|translate}}</th>
                <th>{{'operation'|translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="list in template_list">
                <!-- <td>{{list.id}}</td> -->
                <td>{{list.title_id}}</td>
                <td>{{list.title}}</td>
                <td>{{list.keyword_id}}</td>
                <td>
                    <span ng-bind-html="list.content | html"></span>
                </td>
                <td>
                    <span ng-bind-html="list.example | html"></span>
                </td>
                <td>
                    <template-category ng-model="list.category"></template-category>
                </td>
                <td>
                    <template-type ng-model="list.type"></template-type>
                </td>
                <td>
                    <button class="sui-btn btn-primary" ng-click="addTemplateToPersonal(list.id,list.category,list.type)">{{'添加至个人模板列表'|translate}}</button>
                </td>
            </tr>
        </tbody>
    </table>
    <pager page-no="1" page-size="pageSize" total="total_count" get-data="getSubscribemessageList(pageNo)"></pager>
</div>